package cn.edu.sdjzu.xg.bysj.domain;

import cn.edu.sdjzu.xg.bysj.domain.authority.Actor;
import lombok.*;
import util.IdService;

import java.io.Serializable;
import java.util.Set;

@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
@ToString
public final class Teacher extends Actor implements Comparable<Teacher>, Serializable {

    private Integer id;
    private String no;
    private String name;
    //属性名为Title，字段名为profTitle
    private ProfTitle profTitle;
    private Degree degree;
    private Department department;


    @Override
    public int compareTo(Teacher other) {
        // no为排序依据
        return this.no.compareTo(other.no);
    }

    public String toString() {
        final String TAB = "    ";

        String retValue = "";

        retValue = "Teacher ( "
                + super.toString() + TAB
                + "id = " + this.id + TAB
                + "name = " + this.name + TAB
                + "title = " + this.profTitle + TAB
                + "degree = " + this.degree + TAB
                + "department = " + this.department + TAB

                + " )";

        return retValue;
    }

}

	/*public String toString()
	{
		final String TAB = "    ";

		String retValue = "";

		retValue = "Teacher ( "
				+ super.toString() + TAB
				+ "id = " + this.id + TAB
				+ "name = " + this.name + TAB
				+ "title = " + this.profTitle + TAB
				+ "degree = " + this.degree + TAB
				+ "department = " + this.department + TAB
				+ "projects = " + this.projects + TAB
				+ "user= " + this.user + TAB
				+ " )";

		return retValue;
	}

}*/

